    public class Person {
        String name;
        char sex;
        int age;
        public Person() {
        }
        public Person(String s) {
            this.name=s;
        }
        public Person(String s,char c) {
            this.name=s;
            this.sex=c;
        }
        public Person(String s,char c,int i) {
            this.name=s;
            this.sex=c;
            this.age=i;
        }
        private String getName() {
            return name;
        }
        private char getSex() {
            return sex;
        }
        private int getAge() {
            return age;
        }

        public static void main(String[] args) {
            Person person = new Person("张三",'男',20);
            System.out.println("姓名:"+person.getName()+" "+"性别："+person.getSex()+" "+"年龄:"+person.getAge());
        }
    }
